Skip to content

Validate quiver otel_* event names at compile time#2977

Open
cijothomas wants to merge 3 commits into
open-telemetry:mainfrom
cijothomas:validate-quiver-event-names
Open

Validate quiver otel_* event names at compile time#2977
cijothomas wants to merge 3 commits into
open-telemetry:mainfrom
cijothomas:validate-quiver-event-names

Conversation

@cijothomas
Copy link
Copy Markdown
Member

Follow-up to #2957, which intentionally skipped the local macro copies in the quiver crate.

Zero runtime cost (compile-time only). All existing quiver call sites already use short stable identifiers (e.g. quiver.wal.rotate), so no call-site updates were required.

@cijothomas cijothomas requested a review from a team as a code owner May 14, 2026 18:14
@github-actions github-actions Bot added the rust Pull requests that update Rust code label May 14, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

❌ Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.95%. Comparing base (2d53d89) to head (1b83cc2).

❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2977      +/-   ##
==========================================
- Coverage   85.96%   85.95%   -0.01%     
==========================================
  Files         725      725              
  Lines      276289   276299      +10     
==========================================
- Hits       237503   237499       -4     
- Misses      38262    38276      +14     
  Partials      524      524              
Components Coverage Δ
otap-dataflow 87.08% <0.00%> (-0.01%) ⬇️
query_abstraction 80.61% <ø> (ø)
query_engine 89.57% <ø> (ø)
otel-arrow-go 52.45% <ø> (ø)
quiver 92.18% <0.00%> (-0.08%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AaronRM
Copy link
Copy Markdown
Contributor

AaronRM commented May 14, 2026

LGTM. Thanks @cijothomas!

Copilot AI review requested due to automatic review settings May 19, 2026 00:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Follow-up to #2957 that applies the same compile-time event-name validation to the quiver crate's local logging macro copies.

Changes:

  • Adds pub(crate) const fn validate_event_name to quiver/src/logging.rs enforcing non-empty, no-whitespace event names.
  • Wraps each macro arm (otel_info!, otel_warn!, otel_error!, otel_debug!, otel_event!) in a block and invokes the validator via const _: () = ... for compile-time enforcement.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rust Pull requests that update Rust code

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants